package com.thoughtful;

import com.thoughtful.annotation.RpcScan;
import com.thoughtful.remoting.transport.netty.server.NettyRpcServer;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author yushun
 * @createTime 2022/10/19 - 17:21
 **/
@RpcScan(basePackage = {"com.thoughtful"})
public class NettyServiceMain {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(NettyServiceMain.class);
        NettyRpcServer nettyRpcServer = (NettyRpcServer) applicationContext.getBean("nettyRpcServer");

        nettyRpcServer.start();
    }

}
